package com.sqznkj.Dao;

import com.sqznkj.entity.admin;
import com.sqznkj.entity.artcle;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface AdminDao {
    @Select("select * from admin")
    public admin checkName();
    @Select("select * from artcle")
    public List<artcle> getArtcle();
    @Insert("insert into artcle(title, content, date) values(#{title}, #{content}, #{date})")
    public int add(artcle a);
    @Delete("delete from artcle where title=#{title}")
    public int deleteByTitle(String title);


}
